<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

<html>
<head>
	<title>Java Platform Manager</title>
</head>
<body>
	<f:view>
		<h:form id="CreateTestData">
			<h:commandButton value="Create Java SE data" action="#{JPMClient.createJavaSE}"/>
			<h:commandButton value="Create Java EE data" action="#{JPMClient.createJavaEE}"/>
		</h:form>
		<h:dataTable value="#{JPMClient.allPlatforms}" var="platform" border="1">
			<h:column>
				<f:facet name="header">
					<h:outputText value="ID"/>
				</f:facet>
				<h:outputText value="#{platform.id}"/>
			</h:column>
			<h:column>
				<f:facet name="header">
					<h:outputText value="JSRs"/>
				</f:facet>
				<h:dataTable value="#{platform.jsrs}" var="jsr" border="1">
					<h:column>
						<f:facet name="header">
							<h:outputText value="ID"/>
						</f:facet>
						<h:outputText value="#{jsr.number}"/>
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="Description"/>
						</f:facet>
						<h:outputText value="#{jsr.description}"/>
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="Packages"/>
						</f:facet>
						<h:dataTable value="#{jsr.packages}" var="pack" border="0">
							<h:column>
								<h:outputText value="#{pack.name}"/>
							</h:column>
						</h:dataTable>
					</h:column>
				</h:dataTable>
			</h:column>
		</h:dataTable>
	</f:view>
</body>
</html>